package com.vhall.component.entity.tag.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author guoxin.wang
 * @date 2021-07-05 19:14
 */
@Data
public class TagCreateVO implements Serializable {

    private static final long serialVersionUID = 1392149546129117855L;

    /**
     * token
     */
    @ParamName("token")
    private String token;

    /**
     * name
     */
    @NotBlank(message = "name参数错误")
    @ParamName("name")
    @Length(min = 1, max = 8)
    private String name;

    /**
     * type
     */
    @Min(value = 0, message = "type参数取值范围为0、1")
    @Max(value = 1, message = "type参数取值范围为0、1")
    @NotNull(message = "type参数错误")
    @ParamName("type")
    private Integer type;

}
